package com.zfzs.post.modules.flow.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
* @author wq
* @date 2019-10-21
*/
@Entity
@Data
@Table(name="flow_activ")
public class FlowActiv implements Serializable{

    @Id
    @Column(name = "activ_id")
    private Long activId;
    /**
     * 返现人
     */
    @Column(name = "agent_id")
    private Long agentId;

    @Column(name = "sn")
    private String sn;

    @Column(name = "amount")
    private BigDecimal amount;

    @Column(name = "create_time")
    private Date createTime;

    @Column(name = "channel_id")
    private Long channelId;
    /**
     * 激活人
     */
    @Column(name="activ_agent")
    private Long activAgent;

    public void copy(FlowActiv source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}